/**
 * 功能描述
 */

define(function (require, exports, module) {

	var MonthRange = require("monthRange");
	var roomTypesPriceCalendarComp = require("../component/roomTypesPriceCalendarComp");
	
    var instance = {
        initComponent: function (params, widget) {
        	var month = moment().month();
        	var monthRange = new MonthRange({
	       		 parentNode: ".pull-right",
	       		 model:{
	       			 isRender:false,
	       			 rangeStartYear:2016,
	       			 rangeEndYear:moment().year()+1,
	       			 defaultValue:{
	       				 startMonth: month+1
	       			 },
	       			 events:{
	       				 click:function(e,value){
	       					roomTypesPriceCalendarComp.initComponent(params, widget);
	       				 }
	       			 }
	       		 }
	       	});
        	
        	widget.set("monthRange",monthRange);
        }
    };
    module.exports = instance;
});
